<?php

/**
 * Abstract Class Driver
 * Table Interface
 * Copyright 2009 Matt Basta
 * 
 */

interface cloud_driver_table {
	
	public function destroy();
	
	public function get_driver();
	
	public function get_columns();
	public function create_column($name, $properties = null);
	public function delete_column();
	
	public function get_indexes();
	public function get_primary_index();
	//	> An array, key being column name, value being type
	public function make_index($name, $type);
	//	> If not supported, return true
	public function make_private_key($name);
	//	> If not supported, return true
	//	> If primary key is already set, update
	public function make_searchable($name);
	//	> If ubiquitous search or not supported, return true
	public function unset_index($name);
	//	> If not supported, return true
	
	public function get_length(); // To return an integer row count
	public function get_size(); // To return an integer data volume (estimated if not possible)
	
	// $id should be the primary key for the row
	public function update_row($id, $values);
	public function upsert_row($id, $values);
	public function insert_row($id, $values);
	
	
	
}